#pragma once

class UniformBufferObject
{
public:
	UniformBufferObject(GLenum bufUsage = GL_STATIC_DRAW);
	virtual ~UniformBufferObject();
	
	virtual void Init(GLuint blockSize, void *blockBuffer, GLuint bindPoint);
	virtual void Init(char *uniformBlockName, GLuint program, GLuint bindPoint);
	virtual void QueryOffset(GLuint program){};
	void SetBufferData(int offset, int size, void *data, bool bind);
	GLuint GetBindPoint();
	GLuint GetUboName();
	void Bind();
	void UnBind();

protected:

	GLuint m_uboName;
	GLenum m_bufUsage;
	GLuint m_bindPoint;
};
